<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>字面量赋值方式创建对象</title>
</head>
<body>
<script>
    var dog={
        name:"中华田园犬",
        genera:"犬科 犬属",
        area:"中国各地，亚洲周边等地",
        uses:"家犬、伴侣犬 等",
        showName:function(){
            alert(this.name);
        }
    }
    dog.showName();
</script>
</body>
</html>